using System.Collections.Generic;
using UserManagement.Dal;

namespace UserManagement.DomainEntity.Tests
{
    public class FakeClassWithId<T>
    {
        #region protected structure

        protected struct FakeClass
        {
            public int Id;
            public T MockedClass;
        }

        #endregion protected structure

        #region protected fields

        private int _maxId = 1;

        private readonly IList<FakeClass> _testClasses = new List<FakeClass>();

        #endregion protected fields

        #region protected properties

        protected delegate T GetMockedClassMethod(int id, T mockedClass);

        protected delegate IList<T> GetMockedClassListMethod(IList<FakeClass> fakeClasses);

        protected int MaxId
        {
            get { return _maxId; }
            set { _maxId = value; }
        }

        protected GetMockedClassMethod GetMockedClass { get; set; }

        protected GetMockedClassListMethod GetMockedClassList { get; set; }

        protected IRepository FakeRepository { get; set; }

        protected IList<FakeClass> TestClasses
        {
            get { return _testClasses; }
        }

        #endregion protected properties
    }
}